package Book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Wukong
 * Date: 2022-05-21
 * Time: 10:26
 */
public class BookList {
    private Book[]books=new Book[10];
    private int usedSize;//当前放了多少本书

    public BookList() {
        books[0]=new Book("三国演义","罗贯中",29,"名著");
        books[1]=new Book("西游记","吴承恩",29,"名著");
        books[2]=new Book("红楼梦","曹雪芹",29,"名著");
        usedSize=3;
    }
    /**
     * 返回当前位置书的信息
     */
    public Book getBook(int pos){
        return books[pos];
    }
    public void setBooks(int pos,Book book){
        books[pos]=book;//放一本书

    }
    public int getUsedSize(){
        return usedSize;//获取当前放了多少本书
    }
    public void setUsedSize(int size){
        //修改书的个数
        usedSize=size;
    }
}
